event delegation does not work#4
Conversation
There was a problem hiding this comment.
maybe - you could make the first test pass without making this test pass if you only change half of the condition at https://github.com/Raynos/dom-delegator/blob/v9.0.0/dom-delegator.js#L120
|
I think the term your looking for is
Currently the events default to calling I've not had any need for either of those features so far. I'd be interested in seeing what the use case is. |
|
the main use case i have right now is closing a modal dialog via ESC. if a component in a dialog is focused, when the user presses ESC, the dialog should close. currently, if any of the focused components have a another use case is navigating items in a list - when an item in the list is focused and the user presses a key to navigate to another item, the focus should move. event delegation relies on event bubbling - so call it whatever you like, but it's not working 😦
that's a really bad generalization to make. it's hard to say "most of the times" at all but if you said it for anything, i think i might say i do want it to always bubble but most of the times i call at first i thought that there was simply no bubbling implemented in dom-delegator but then i saw that there were certain conditions where there's an attempt at simulating it https://github.com/Raynos/dom-delegator/blob/v9.0.0/dom-delegator.js#L121. this leads to inconsistencies that depend on what content i add as children to the |
|
I will implement There will be a flag passed to If it's set to If it's set to I will update In |
|
this sounds like it would get me what i need. when it's ready, i'll try it out. |
|
@neonstalwart I just added the ability to This means you can manually call Whether bubbling or not should be the default is a seperate issue. |
|
I have not implemented |
this adds some failing tests for event delegation. i think i may have some
other tests to add too but just wanted to use these to start the conversation
about how delegation should work.
some of the other things i want to test are:
let me know if delegation is supposed to work some other way so that i can get
it working in my project and try to add some other tests for that way.